<?php

//print_r($_POST);

if ($_POST != '') {
	parse();
}

function parse() {
	global $_POST;
//	echo json_encode($_POST);
//	sleep(1);
	
	$str = file_get_contents('stat.txt');
	foreach ($_POST as $k => $v) {
		$correct_return = "\r\n";
		$str .= $k .'='.$v.' | ';
	}
	$str .= $correct_return;
	$f = fopen('stat.txt', 'w+');
	fwrite($f, $str);
	fclose($f);
	echo json_encode($_POST);
}

?>